xl: enable using ranges of pCPUs when creating cpupools
authorDario Faggioli <dario.faggioli@citrix.com>
Fri, 13 Mar 2015 11:09:41 +0000 (12:09 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 18 Mar 2015 12:51:24 +0000 (12:51 +0000)
commita86eecbbf5155aa5b4ec02b6c5e41baf1a7f49de
tree33b747c3b8d38b3f8bf3ea81755d8bef0da4d656
parent62ff09ae2f8c77998ce500ba3d16b2f33aeb9010
xl: enable using ranges of pCPUs when creating cpupools

instead of just list of single pCPUs or NUMA node IDs, as
it happens right now.

On the other hand, after this change, strings containing
pCPUs and NUMA node ranges is supported. The syntax is the
same one supported by the "cpus" and "cpus_soft" config
switch, i.e., "4-8" or "node:1,12-18,^14".

This make things more flexible, more consistent, and also
improves error handling, as the pCPU range parsing routine
already present in xl is more reliable than just a call
to atoi().

While there, remove a redundant error check in the legacy syntax
handling (libxl_bitmap_test() already checks the index being
within the size of the bitmap).

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Juergen Gross <JGross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
docs/man/xlcpupool.cfg.pod.5
tools/libxl/xl_cmdimpl.c